﻿#region Using Directives

    using System;

    using Csla;

    using MarketPulse.BusinessLogic.Core;
    using MarketPulse.BusinessLogic.Common.Criteria;

#endregion

namespace MarketPulse.BusinessLogic.Common
{
    /// <summary>
    /// This class represents a read only collection of read only Assignment objects that are made by a mystery shopper or exit 
    /// interviewer (for eaxmple) when conducting either a mystery shop or exit interview or other 
    /// survey. 
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.DataAccess.Factory.AssignmentFactory, MarketPulse.DataAccess.Factory", "FetchInfoList")]
    public class AssignmentInfoList : MarketPulseReadOnlyListBase<AssignmentInfoList, AssignmentInfo>
    {

        #region Constructors

            /// <summary>
            /// Default constructor is private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private AssignmentInfoList()
            {
            }

        #endregion

        #region Methods

            #region Factory Methods

                /// <summary>
                /// Method used to get a list of read only Assignments that are associated with a particular Client (via the DataPortal client proxy)
                /// </summary>
                /// <param name="clientGuid">The Guid of the Country to retrieve the Assignments for </param>
                /// <returns>The valid list of Assignments (populated or empty)</returns>
                public static AssignmentInfoList GetByCountryGuid(Guid countryGuid)
                {
                    return DataPortal.Fetch<AssignmentInfoList>(new AssignmentSearchCriteria(null, countryGuid));
                }

                ///// <summary>
                ///// Method used to get a list of read only Assignments that are associated with a particular Client (via the DataPortal client proxy)
                ///// </summary>
                ///// <param name="clientGuid">The Guid of the Client to retrieve the Assignments for </param>
                ///// <returns>The valid list of Assignments (populated or empty)</returns>
                //public static AssignmentInfoList GetByClientGuid(Guid clientGuid)
                //{
                //    return DataPortal.Fetch<AssignmentInfoList>(new AssignmentSearchCriteria(clientGuid));
                //}

                ///// <summary>
                ///// Method used to get a list of read only Assignments (via the DataPortal client proxy)
                ///// </summary>
                ///// <returns>The valid list of Assignments (populated or empty)</returns>
                //public static AssignmentInfoList GetAll()
                //{
                //    return DataPortal.Fetch<AssignmentInfoList>(new AssignmentSearchCriteria(null));
                //}

            #endregion

        #endregion

    }
}
